package com.minhua.jijiehao2.mainframe.mine.companyResultActivity.impl

import com.minhua.jijiehao2.base.BaseMvpPresenter
import com.minhua.jijiehao2.bean.BaseBean
import com.minhua.jijiehao2.bean.CompanyIdentifyBean
import com.minhua.jijiehao2.constants.DefineKey
import com.minhua.jijiehao2.http.CallBack
import com.minhua.jijiehao2.http.ParamsMap
import com.minhua.jijiehao2.mainframe.circle.entryActivity.impl.EntryModel
import com.minhua.jijiehao2.mainframe.mine.companyResultActivity.imp.ICompanyResultPresenter
import com.minhua.jijiehao2.mainframe.mine.companyResultActivity.imp.ICompanyResultView
import com.minhua.jijiehao2.utils.SPUtils

class CompanyResultPresenter : BaseMvpPresenter<ICompanyResultView>(), ICompanyResultPresenter {

    private val mCompanyResultModel = EntryModel()

    override fun getCompanyResult() {
        val map = ParamsMap()
        map.put("userId", SPUtils.get(DefineKey.USER_ID, ""))
        mCompanyResultModel.getIdentifyStatus(map, object : CallBack<CompanyIdentifyBean>() {
            override fun onSuccess(t: BaseBean<CompanyIdentifyBean>) {
                v?.onInfoSuccess(t.data!!)
            }
        })

    }

}